package com.yunkeji.common.exception;

import com.yunkeji.common.constant.AppHttpStatus;

/**
 * 业务异常
 *
 * @author yunkeji
 */
public final class AppServiceException extends ServiceException {

    public static ServiceException reTryException(String msg) {
        return new ServiceException(msg, AppHttpStatus.重新请求);
    }

    public static ServiceException balancenotEnough(String msg) {
        return new ServiceException(msg, AppHttpStatus.通话余额不足);
    }

    public static ServiceException reLoginException(String msg) {
        return new ServiceException(msg, AppHttpStatus.要求登录);
    }

    public static ServiceException reLevelException(String msg) {
        return new ServiceException(msg, AppHttpStatus.强制升级);
    }

    public static ServiceException tokenException(String msg) {
        return new ServiceException(msg, AppHttpStatus.USER_TOKEN失效);
    }

    public static ServiceException paramException(String msg) {
        return new ServiceException(msg, AppHttpStatus.参数错误);
    }

    public static ServiceException goldNotEnoughException(String msg) {
        return new ServiceException(msg, AppHttpStatus.金币余额不足);
    }

    public static ServiceException diamondNotEnoughException(String msg) {
        return new ServiceException(msg, AppHttpStatus.钻石余额不足);
    }

    public static ServiceException needSign(String msg) {
        return new ServiceException(msg, AppHttpStatus.电签异常);
    }

    public static ServiceException sysException(String msg) {
        return new ServiceException(msg, AppHttpStatus.系统错误);
    }

    public static ServiceException accountException(String msg) {
        return new ServiceException(msg, AppHttpStatus.账号异常);
    }

    public static ServiceException alternativeLoginException(String msg) {
        return new ServiceException(msg, AppHttpStatus.账号异地登录);
    }

    public static ServiceException inBlackList(String msg) {
        return new ServiceException(msg, AppHttpStatus.被拉黑);
    }
}
